package com.ywu.bpmn.standard.produce;

import com.ywu.bpmn.standard.config.YwuBpmnProduceConfig;
import com.ywu.mq.sdk.producer.YwuKafkaProducer;
import lombok.Data;
import org.apache.kafka.clients.producer.RecordMetadata;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * @ClassName YwuBpmnProduce
 * @Description TODO
 * @Author GroundDemo
 * @Date 2025/4/23 11:08
 * @Version 1.0
 **/
@Component
@Data
public class YwuBpmnProduce extends YwuKafkaProducer {
    @Autowired
    private YwuBpmnProduceConfig config;

    private String key;

    /**
     * @Author GroundDemo
     * @Description 初始化配置
     * @Date 17:57 2025/3/28
     * @Param []
     * @return void
     **/
    @PostConstruct
    public void init() {
        init(config);
    }

    @Override
    public String getKey() {
        return key;
    }

    @Override
    public void customCallBack(RecordMetadata metadata, Exception exception, String messageId, String key, String value) {

    }
}
